import request from '@/utils/request'


// 查询隐患发现
export function dangerhiddenDiscover(query) {
    return request({
      url: '/app/dangerhidden/getList',
      method: 'post',
      data: query
    })
  }

//待审核
export function dangerhiddenLoding(query) {
    return request({
      url: `/app/dangerhidden/listByMyslef/${query.userId}/${query.category}`,
      method: 'get',
      params: query
    })
  }
//已审核
export function dangerhiddenOk(data) {
    return request({
      url: `/app/dangerhidden/getList`,
      method: 'post',
      data
    })
}
// 已整改
export function listRectification(data) {
    return request({
      url: `/app/dangerhidden/listRectification`,
      method: 'post',
      data
    })
}


  // 新增
export function adddangerhidden(query) {
    return request({
      url: '/app/dangerhidden',
      method: 'post',
      data: query
    })
  }
  // -审核
  export function dangerhiddenUpdate(query) {
    return request({
      url: '/app/dangerhidden/update',
      method: 'post',
      data: query
    })
  }
// -整改
export function dangerhidden(query) {
  return request({
    url: '/app/dangerhidden',
    method: 'put',
    data: query
  })
}

//导出
export function dangerDownload(flowNos) {
  return request({
    url: `/app/dangerhidden/exportPDF/${flowNos}`,
    method: 'get',
  })
}





  // 查询已审核的接口
export function checkeddangerhidden(query) {
    return request({
      url: '/app/dangerhidden/getList',
      method: 'post',
      data: query
    })
  }

  
// 删除
export function delBalstLibrary(flowNo) {
  return request({
    url: '/app/dangerhidden/' + flowNo,
    method: 'delete'
  })
}
